//封装axios，配置请求地址 baseUrl.
import axios from "axios";
// http://kumanxuan1.f3322.net:8881/cms
const instance = axios.create({
  baseURL: "http://kumanxuan1.f3322.net:8809",
  // baseURL: "/api",
});
instance.interceptors.request.use(
  function (config) {
    let token = localStorage.getItem("token");
    if (token) {
      config.headers["x-authorization"] = token;
    }
    return config;
  },
  function (error) {
    return Promise.reject(error);
  }
)
export default instance;

